home *** CD-ROM | disk | FTP | other *** search
/ Computer Life 1995 December / Computer Life December 1995.iso / tapcis / whatsnew.scr < prev    next >
INI File  |  1995-10-08  |  3KB  |  107 lines

  1. [*About this script*]
  2. This script captures stories from "What's New on CompuServe", placing each
  3. story in a separate message in the message file.
  4.  
  5. By default, this script captures stories from CompuServe's main What's New
  6. menu. If you would like to capture the European What's New stories as well,
  7. change the line "Europe=No" to "Europe=Yes" under the [*Variables*] heading
  8. below. To capture only the European stories, also change the line
  9. "WhatsNew=Yes" to "WhatsNew=No" under the same heading.
  10.  
  11. ;This script isn't necessarily a good model of how to handle multi-page
  12. ;menus of articles. The stories in What's New don't consistently lead back
  13. ;to the menu page from which they were read. So this script "counts" the
  14. ;submenus, and GO's back to the first page after each group of stories.[]
  15.  
  16. Loren Jenkins [76702,1006] - May, 1995
  17.  
  18. Revised:
  19. 04-Jun-95   - fixed to handle variations in story headings (lj)
  20.  
  21. [*Script Setup*]
  22. Title=What's New on CompuServe
  23.  
  24. [*Variables*]
  25. WhatsNew=Yes
  26. Europe=No
  27.  
  28. [Begin]
  29. Echo "Script to capture What's New articles"
  30. if ( @capName$ = "" ) Let @capName$ = @pathMsg$ @svcName$ '.MSG'
  31. Let @hdrNum = @On
  32. Let oldEcho = @echo
  33.  
  34. WaitList
  35.     1 = "^JMORE !"
  36.     2 = "^J!"
  37.     EndList
  38.  
  39. if ( WhatsNew ) goto 'StartWhatsNew'
  40. if ( Europe )   goto 'StartEurope'
  41. goto 'Finished'
  42.  
  43. [StartWhatsNew]
  44. Let @hdrSec$ = "0 What's New on CompuServe"
  45. Let gopage$ = 'GO CIS:NEW'
  46. Let command$ = gopage$
  47. Let menuToRead# = 1
  48. Let lastPage = @No
  49. Let WhatsNew = @No
  50. goto 'GetMenu'
  51.  
  52. [StartEurope]
  53. if ( gopage$ ) Echo "European What's New"
  54. Let @hdrSec$ = "1 European What's New"
  55. Let gopage$ = 'GO CIS:EURONEW'
  56. Let command$ = gopage$
  57. Let menuToRead# = 1
  58. Let lastPage = @No
  59. Let Europe = @No
  60. goto 'GetMenu'
  61.  
  62. [GetMenu]
  63. Send command$
  64. DoWaitMenu stories[]
  65. Set @echo @off
  66. if ( @waitMatch# = 2 ) let lastPage = @True
  67. if ( command$ = gopage$ ) Let menuPage# = 1
  68. if ( menuPage# = menuToRead# ) goto 'ReadMenu'
  69.  
  70. [GetNextMenu]
  71. if ( lastPage ) goto 'Finished'
  72. Let menuPage# = menuPage# + 1
  73. Let command$ = ''
  74. Goto 'GetMenu'
  75.  
  76. [ReadMenu]
  77. ForEach in stories[] gosub "ReadArticle"
  78. Let menuToRead# = menuToRead# + 1
  79. Let command$ = gopage$
  80. Goto 'GetMenu'
  81.  
  82. [ReadArticle]
  83. ; skip the menu choices that aren't articles
  84. if ( @strstr(@arrValue$, "special events/contests") )   return
  85. if ( @strstr(@arrValue$, "what's new archives") )       return
  86. if ( @strstr(@arrValue$, "more what's new stories") )   return
  87. if ( @strstr(@arrValue$, "what's new in europe") )   return
  88. Let @hdrSub$ = @arrValue$
  89. Send @arrItem$
  90. Wait "^J"
  91. Echo "Capturing story " @arritem$ "/" @arrvalue$
  92. Wait "^J"
  93. Wait "^J"
  94. CapHeader
  95. Wait "^JLast page."
  96. Wait "!"
  97. CapClose
  98. Return
  99.  
  100. [Finished]
  101. if ( Europe ) goto 'StartEurope'
  102. Set @echo oldEcho
  103. Send '^M'
  104. Wait '!'
  105. Echo "End of script"
  106. End
  107.